
public class Holding {
	private Card card1;
	private Card card2;
	
	public Holding(Card c1, Card c2){
		if(c1.getCard()[0]==c2.getCard()[0] && c1.getCard()[1]==c2.getCard()[1]){
			System.err.println("gleiche Karten..");
			System.err.println("verlasse Programm");
			System.exit(0);
		}
		if( (c1.getCard()[0]<0||c1.getCard()[0]>12) || (c2.getCard()[0]<0||c2.getCard()[0]>12) ) {
			System.err.println("Cardvalue OOR");
			System.exit(0);
		}
		if( (c1.getCard()[1]<0||c1.getCard()[1]>3) || (c2.getCard()[1]<0||c2.getCard()[1]>3) ) {
			System.err.println("Color OOR");
			System.exit(0);
		}
		if(c1.getCard()[0]<c2.getCard()[0]){
			Card c = c2; c2 = c1; c1 = c;
		}
		card1 = c1;
		card2 = c2;
		
	}
	
	public Card[] getHolding(){
		Card[] holding = new Card[2];
		holding[0] = this.card1;
		holding[1] = this.card2;

		return holding;
	}
	
}
